package kpython.backend.ir.tree;

import java.util.LinkedList;
import java.util.List;

public class FunctionBlock extends Block {

	public Label label = null;
	public List<Atom> args = new LinkedList<Atom>();
	public SimpleBlock block = null;	
	public Goto skip = null;
	
	public void printTree(String tab) {
		System.out.println(tab+this.getClass().getSimpleName());
		label.printTree(tab+"\t");
		for(Atom atom: args) {
			atom.printTree(tab+"\t");
		}
		block.printTree(tab+"\t");
		skip.printTree(tab+"\t");
	}
	
	public String toString() {
		return this.getClass().getSimpleName();
	}

	@Override
	public Object accept(IRTreeVisitor visitor, Object data) {	
		return visitor.visit(this, data);
	}
}
